home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: delta / whiteline CD Series - delta.iso / tex / style / misc / array.sty < prev    next >
Text File  |  1995-11-25  |  13KB  |  362 lines

  1. %% 
  2. %% This is file `array.sty', generated 
  3. %% on <1992/12/17> with the docstrip utility (2.0r).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% array.doc  (with options: `style,ncols')
  8. %% 
  9. %% Copyright (C) 1989-1992 by Frank Mittelbach. All rights reserved. 
  10. %% 
  11. %% This file is part of the array package. 
  12. %% 
  13. %% IMPORTANT NOTICE: 
  14. %% 
  15. %% You are not allowed to change this file. You may however copy 
  16. %% this file to a file with a different name and then change the copy 
  17. %% if you obey the restrictions on file changes described in 
  18. %% readme.mz. 
  19. %% 
  20. %% You are NOT ALLOWED to distribute this file alone. You are NOT 
  21. %% ALLOWED to take money for the distribution or use of this file (or 
  22. %% a changed version) except for a nominal charge for copying etc. 
  23. %% 
  24. %% You are allowed to distribute this file under the condition that 
  25. %% it is distributed together with all files mentioned in readme.mz5. 
  26. %% 
  27. %% If you receive only some of these files from someone, complain! 
  28. %% 
  29. %% However, if these files are distributed by established suppliers 
  30. %% as part of a complete TeX distribution, and the structure of the 
  31. %% distribution would make it difficult to distribute the whole set 
  32. %% of files, *those parties* are allowed to distribute only some of 
  33. %% the files provided that it is made clear that the user will get a 
  34. %% complete distribution-set upon request to that supplier (not me). 
  35. %% Notice that this permission is not granted to the end user. 
  36. %% 
  37. %% 
  38. %% For error reports in case of UNCHANGED versions see readme.mz 
  39. %% 
  40.  
  41. \def\fileversion{v2.1b}
  42. \def\filedate{92/07/06}
  43. \def\docdate {92/09/12}
  44.  
  45. %% \CheckSum{1070}
  46. %% \CharacterTable
  47. %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  48. %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  49. %%   Digits        \0\1\2\3\4\5\6\7\8\9
  50. %%   Exclamation   \!     Double quote  \"     Hash (number) \#
  51. %%   Dollar        \$     Percent       \%     Ampersand     \&
  52. %%   Acute accent  \'     Left paren    \(     Right paren   \)
  53. %%   Asterisk      \*     Plus          \+     Comma         \,
  54. %%   Minus         \-     Point         \.     Solidus       \/
  55. %%   Colon         \:     Semicolon     \;     Less than     \<
  56. %%   Equals        \=     Greater than  \>     Question mark \?
  57. %%   Commercial at \@     Left bracket  \[     Backslash     \\
  58. %%   Right bracket \]     Circumflex    \^     Underscore    \_
  59. %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
  60. %%   Right brace   \}     Tilde         \~}
  61. %%
  62. %% Style-option `array' to use with LaTeX v2.09
  63. %% Copyright (C) 1989-1992 Frank Mittelbach, all rights reserved.
  64. \@ifundefined{d@llarbegin}{}{\endinput}
  65. \typeout{Style-Option: `array' \fileversion
  66.          \space\space <\filedate> (F.M.)}
  67. \typeout{English documentation dated \space <\docdate> (F.M.)}
  68. \def\@addtopreamble#1{\xdef\@preamble{\@preamble #1}}
  69. \def\@testpach{\@chclass
  70.  \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
  71.   \ifnum \@lastchclass=7 5 \else
  72.    \ifnum \@lastchclass=8 \tw@ \else
  73.     \ifnum \@lastchclass=9 \thr@@
  74.    \else \z@
  75.    \ifnum \@lastchclass = 10 \else
  76.    \edef\@nextchar{\expandafter\string\@nextchar}%
  77.    \@chnum
  78.    \if \@nextchar c\z@ \else
  79.     \if \@nextchar l\@ne \else
  80.      \if \@nextchar r\tw@ \else
  81.    \z@ \@chclass
  82.    \if\@nextchar |\@ne \else
  83.     \if \@nextchar !6 \else
  84.      \if \@nextchar @7 \else
  85.       \if \@nextchar <8 \else
  86.        \if \@nextchar >9 \else
  87.   10
  88.   \@chnum
  89.   \if \@nextchar m\thr@@\else
  90.    \if \@nextchar p4 \else
  91.     \if \@nextchar b5 \else
  92.    \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi
  93.    \fi \fi  \fi  \fi  \fi  \fi  \fi \fi \fi \fi \fi \fi}
  94. \def\@xexpast#1*#2#3#4\@@{%
  95.    \@tempcnta #2
  96.    \toks@={#1}\@temptokena={#3}%
  97.    \let\the@toksz\relax \let\the@toks\relax
  98.    \def\@tempa{\the@toksz}%
  99.    \ifnum\@tempcnta >0 \@whilenum\@tempcnta >0\do
  100.      {\edef\@tempa{\@tempa\the@toks}\advance \@tempcnta \m@ne}%
  101.        \let \@tempb \@xexpast \else
  102.        \let \@tempb \@xexnoop \fi
  103.    \def\the@toksz{\the\toks@}\def\the@toks{\the\@temptokena}%
  104.    \edef\@tempa{\@tempa}%
  105.    \expandafter \@tempb \@tempa #4\@@}
  106. \def\prepnext@tok{\advance \count@ \@ne
  107.    \toks\count@{}}
  108. \def\save@decl{\toks\count@ \expandafter{\@nextchar}}
  109. \def\insert@column{%
  110.    \the@toks \the \@tempcnta
  111.    \ignorespaces \@sharp \unskip
  112.    \the@toks \the \count@ \relax}
  113. \newdimen\col@sep
  114. \def\@acol{\@addtopreamble{\hskip\col@sep}}
  115. \def\@mkpream#1{\gdef\@preamble{}\@lastchclass 4 \@firstamptrue
  116.    \let\@sharp\relax \let\@startpbox\relax \let\@endpbox\relax
  117.    \@xexpast #1*0x\@@
  118.    \count@\m@ne
  119.    \let\the@toks\relax
  120.    \prepnext@tok
  121.    \expandafter \@tfor \expandafter \@nextchar
  122.     \expandafter :\expandafter =\@tempa \do
  123.    {\@testpach
  124.    \ifcase \@chclass \@classz \or \@classi \or \@classii
  125.      \or \save@decl \or \or \@classv \or \@classvi
  126.      \or \@classvii \or \@classviii  \or \@classix
  127.      \or \@classx \fi
  128.    \@lastchclass\@chclass}%
  129.    \ifcase\@lastchclass
  130.    \@acol \or
  131.    \or
  132.    \@acol \or
  133.    \@preamerr \thr@@ \or
  134.    \@preamerr \tw@ \@addtopreamble\@sharp \or
  135.    \or
  136.    \else  \@preamerr \@ne \fi
  137.    \def\the@toks{\the\toks}}
  138. \def\@classx{%
  139.   \ifcase \@lastchclass
  140.   \@acolampacol \or
  141.   \@addamp \@acol \or
  142.   \@acolampacol \or
  143.   \or
  144.   \@acol \@firstampfalse \or
  145.   \@addamp
  146.   \fi}
  147. \def\@classz{\@classx
  148.    \@tempcnta \count@
  149.    \prepnext@tok
  150.    \@addtopreamble{\ifcase \@chnum
  151.       \hfil
  152.       \d@llarbegin
  153.       \insert@column
  154.       \d@llarend \hfil \or
  155.       \d@llarbegin \insert@column \d@llarend \hfil \or
  156.       \hfil\kern\z@ \d@llarbegin \insert@column \d@llarend \or
  157.    $\vcenter
  158.    \@startpbox{\@nextchar}\insert@column \@endpbox $\or
  159.    \vtop \@startpbox{\@nextchar}\insert@column \@endpbox \or
  160.    \vbox \@startpbox{\@nextchar}\insert@column \@endpbox
  161.   \fi}\prepnext@tok}
  162. \def\@classix{\ifnum \@lastchclass = \thr@@
  163.        \@preamerr \thr@@ \fi
  164.        \@classx}
  165. \def\@classviii{\ifnum \@lastchclass >\z@
  166.       \@preamerr 4\@chclass 6 \@classvi \fi}
  167. \def\@arrayrule{\@addtopreamble \vline}
  168. \def\@classvii{\ifnum \@lastchclass = \thr@@
  169.    \@preamerr \thr@@ \fi}
  170. \def\@classvi{\ifcase \@lastchclass
  171.       \@acol \or
  172.       \@addtopreamble{\hskip \doublerulesep}\or
  173.       \@acol \or
  174.       \@classvii
  175.       \fi}
  176. \def\@classii{\advance \count@ \m@ne
  177.    \save@decl\prepnext@tok}
  178. \def\@classv{\save@decl
  179.    \@addtopreamble{\d@llarbegin\the@toks\the\count@\relax\d@llarend}%
  180.    \prepnext@tok}
  181. \def\@classi{\@classvi
  182.    \ifcase \@chnum \@arrayrule \or
  183.       \@classv \fi}
  184. \def\@startpbox#1{\bgroup
  185.   \hsize #1 \@arrayparboxrestore
  186.    \vrule \@height \ht\@arstrutbox \@width \z@}
  187. \def\@endpbox{\vrule \@width \z@ \@depth \dp \@arstrutbox \egroup}
  188. \def\@array[#1]#2{%
  189.   \@tempdima \ht \strutbox
  190.   \advance \@tempdima by\extrarowheight
  191.   \setbox \@arstrutbox \hbox{\vrule
  192.              \@height \arraystretch \@tempdima
  193.              \@depth \arraystretch \dp \strutbox
  194.              \@width \z@}%
  195.   \begingroup
  196.   \@mkpream{#2}%
  197.   \xdef\@preamble{\ialign \@halignto
  198.                   \bgroup \@arstrut \@preamble
  199.                           \tabskip \z@ \cr}%
  200.   \endgroup
  201.   \@arrayleft
  202.   \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi \fi
  203.   \bgroup
  204.   \let \@sharp ##\let \protect \relax
  205.   \lineskip \z@
  206.   \baselineskip \z@
  207.   \m@th
  208.   \let\\ \@arraycr  \let\par\@empty \@preamble}
  209. \newdimen \extrarowheight
  210. \extrarowheight=0pt
  211. \def\@arstrut{\unhcopy\@arstrutbox}
  212. \def\@arraycr{{\ifnum 0=`}\fi
  213.   \@ifstar \@xarraycr \@xarraycr}
  214. \def\@xarraycr{\@ifnextchar [%
  215.   \@argarraycr {\ifnum 0=`{\fi}\cr}}
  216. \def\@argarraycr[#1]{\ifnum0=`{\fi}\ifdim #1>\z@
  217.   \@xargarraycr{#1}\else \@yargarraycr{#1}\fi}
  218. \def\@xargarraycr#1{\unskip
  219.   \@tempdima #1\advance\@tempdima \dp\@arstrutbox
  220.   \vrule \@depth\@tempdima \@width\z@ \cr}
  221. \def\@yargarraycr#1{\cr\noalign{\vskip #1}}
  222. \def\multicolumn#1#2#3{%
  223.    \multispan{#1}\begingroup
  224.    \def\@addamp{\if@firstamp \@firstampfalse \else
  225.                 \@preamerr 5\fi}%
  226.    \@mkpream{#2}\@addtopreamble\@empty
  227.    \endgroup
  228.    \def\@sharp{#3}%
  229.    \@arstrut \@preamble \ignorespaces}
  230. \let\d@llarbegin\begingroup
  231. \let\d@llarend\endgroup
  232. \def\array{\col@sep\arraycolsep
  233.   \def\d@llarbegin{$}\let\d@llarend\d@llarbegin\gdef\@halignto{}%
  234.   \@tabarray}
  235. \def\@tabarray{\@ifnextchar[{\@array}{\@array[c]}}
  236. \def\tabular{\gdef\@halignto{}\@tabular}
  237. \expandafter\def\csname tabular*\endcsname#1{%
  238.       \gdef\@halignto{to#1}\@tabular}
  239. \def\@tabular{%
  240.   \leavevmode
  241.   \hbox \bgroup $\col@sep\tabcolsep \let\d@llarbegin\begingroup
  242.                                     \let\d@llarend\endgroup
  243.   \@tabarray}
  244. \def\endarray{\crcr \egroup \egroup \gdef\@preamble{}}
  245. \def\endtabular{\endarray $\egroup}
  246. \expandafter\let\csname endtabular*\endcsname=\endtabular
  247. \let\@ampacol=\relax        \let\@expast=\relax
  248. \let\@arrayclassiv=\relax   \let\@arrayclassz=\relax
  249. \let\@tabclassiv=\relax     \let\@tabclassz=\relax
  250. \let\@arrayacol=\relax      \let\@tabacol=\relax
  251. \let\@tabularcr=\relax      \let\@@endpbox=\relax
  252. \let\@argtabularcr=\relax   \let\@xtabularcr=\relax
  253. \def\@preamerr#1{\def\@tempd{{..} at wrong position: }%
  254.    \@latexerr{%
  255.    \ifcase #1 Illegal pream-token (\@nextchar): `c' used\or %0
  256.     Missing arg: token ignored\or                           %1
  257.     Empty preamble: `l' used\or                             %2
  258.     >\@tempd token ignored\or                               %3
  259.     <\@tempd changed to !{..}\or                            %4
  260.     Only one column-spec. allowed.\fi}\@ehc}                %5
  261. \def\@tempa#1:=#2\do#3{\def\@fortmp{#2}\ifx\@fortmp\@empty
  262.       \else\@tforloop#2\@nil\@nil\@@#1{#3}\fi}
  263. \ifx\@tempa\@tfor
  264. \else
  265.   \errhelp{The bug fix for \@tfor was removed from
  266.            array.sty because it was^^J%
  267.            corrected in latex.tex <dec91>.^^J^^J%
  268.            Please update to a newer LaTeX release.}
  269.   \errmessage{Obsolete LaTeX release (older than Dec.91)}
  270.   \let\@tfor\@tempa
  271. \fi
  272. \let\@tempa\@empty
  273. \def\newcolumn{%
  274.   \typeout{*** Obsolete command \string\newcolumn!
  275.                Please use \noexpand\newcolumntype ***}%
  276.   \newcolumntype
  277. }
  278. \def\newcolumntype#1{%
  279.   \edef\NC@char{\string#1}%
  280.   \@ifundefined{NC@find@\NC@char}%
  281.     {\@tfor\next:=<>clrmbp@!|\do{\if\next\NC@char
  282.                     \@warning{Redefining primitive column \NC@char}\fi}%
  283.      \NC@list\expandafter{\the\NC@list\NC@do#1}}%
  284.     {\@warning{Column \NC@char\space is already defined}}%
  285.   \@namedef{NC@find@\NC@char}##1#1{\NC@{##1}}%
  286.   \@ifnextchar[{\newcol@{\NC@char}}{\newcol@{\NC@char}[0]}}
  287. \def\newcol@#1[#2]#3{\expandafter\@reargdef
  288.      \csname NC@rewrite@#1\endcsname[#2]{\NC@find#3}}
  289. \def\NC@#1{%
  290.   \@temptokena\expandafter{\the\@temptokena#1}\futurelet\next\NC@ifend}
  291. \def\NC@ifend{%
  292.   \ifx\next\relax
  293.     \else\@tempswatrue\expandafter\NC@rewrite\fi}
  294. \def\NC@do#1{%
  295.   \expandafter\let\expandafter\NC@rewrite
  296.     \csname NC@rewrite@\string#1\endcsname
  297.   \expandafter\let\expandafter\NC@find
  298.     \csname NC@find@\string#1\endcsname
  299.   \expandafter\@temptokena\expandafter{\expandafter}%
  300.         \expandafter\NC@find\the\@temptokena#1\relax}
  301. \def\showcols{{\def\NC@do##1{\let\NC@do\NC@show}\the\NC@list}}
  302. \def\NC@show#1{%
  303.   \typeout{Column #1\expandafter\expandafter\expandafter\NC@strip
  304.   \expandafter\meaning\csname NC@rewrite@#1\endcsname\@@}}
  305. \def\NC@strip#1:#2->#3 #4\@@{#2 -> #4}
  306. \newtoks\NC@list
  307. \newcolumntype{*}[2]{}
  308. \long\@namedef{NC@rewrite@*}#1#2{%
  309.   \count@#1
  310.   \loop
  311.   \ifnum\count@>\z@
  312.   \advance\count@\m@ne
  313.   \@temptokena\expandafter{\the\@temptokena#2}%
  314.   \repeat
  315.   \NC@find}
  316. \let\@xexpast\relax
  317. \let\@xexnoop\relax
  318. \def\save@decl{\toks \count@ = \expandafter\expandafter\expandafter
  319.                   {\expandafter\@nextchar\the\toks\count@}}
  320. \def\@mkpream#1{\gdef\@preamble{}\@lastchclass 4 \@firstamptrue
  321.    \let\@sharp\relax \let\@startpbox\relax \let\@endpbox\relax
  322.    \@temptokena{#1}\@tempswatrue
  323.    \@whilesw\if@tempswa\fi{\@tempswafalse\the\NC@list}%
  324.    \count@\m@ne
  325.    \let\the@toks\relax
  326.    \prepnext@tok
  327.    \expandafter \@tfor \expandafter \@nextchar
  328.     \expandafter :\expandafter =\the\@temptokena \do
  329.    {\@testpach
  330.    \ifcase \@chclass \@classz \or \@classi \or \@classii
  331.      \or \save@decl \or \or \@classv \or \@classvi
  332.      \or \@classvii \or \@classviii
  333.      \or \@classx
  334.      \or \@classx \fi
  335.    \@lastchclass\@chclass}%
  336.    \ifcase\@lastchclass
  337.    \@acol \or
  338.    \or
  339.    \@acol \or
  340.    \@preamerr \thr@@ \or
  341.    \@preamerr \tw@ \@addtopreamble\@sharp \or
  342.    \or
  343.    \else  \@preamerr \@ne \fi
  344.    \def\the@toks{\the\toks}}
  345. \let\@classix\relax
  346. \def\@classviii{\ifnum \@lastchclass >\z@\ifnum\@lastchclass=\tw@\else
  347.       \@preamerr 4\@chclass 6 \@classvi \fi\fi}
  348. \def\@classv{\save@decl
  349.    \expandafter\NC@ecs\@nextchar\extracolsep{}\extracolsep\@@@
  350.    \@addtopreamble{\d@llarbegin\the@toks\the\count@\relax\d@llarend}%
  351.    \prepnext@tok}
  352. \def\NC@ecs#1\extracolsep#2#3\extracolsep#4\@@@{\def\@tempa{#2}%
  353.   \ifx\@tempa\@empty\else\toks\count@={#1\tabskip#2\relax#3}\fi}
  354. \def\@tabarray{\@ifnextchar[{\@@array}{\@@array[c]}}
  355. \let\@@array\@array
  356. \def\endarray{\crcr \egroup \egroup \@arrayright \gdef\@preamble{}}
  357. \let\@arrayleft\@empty
  358. \let\@arrayright\@empty
  359. \endinput
  360. %% 
  361. %% End of file `array.sty'.
  362.